<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>10.30作业</title>
    <!-- <link rel="stylesheet" href="./作业.css" /> -->
  </head>
  <body>
    <div class="box">
      <!-- 图片 -->
      <div class="img-box">
        <!-- 轮播图图片 -->
        <ul></ul>

        <!-- 轮播图箭头 -->
        <div class="arrow-left">&lt;</div>
        <div class="arrow-right">&gt;</div>
      </div>

      <!-- 小圆点 -->
      <div class="dot-box">
        <span class="dot-active"></span><span></span><span></span><span></span
        ><span></span>
      </div>
    </div>
    <!-- <script src="./作业.js"></script>
    <script src="./作业1.js"></script> -->
    <script>
      let ul = document.querySelector("ul");
      let baseUrl =
        " https://service-dmsf9bxc-1251395798.gz.apigw.tencentcs.com/release/api/web/carouselGroup/getAllCarouselGroup?projectId=6";
      ajaxFn({
        baseUrl,
        url: "/api/getMethod",
        method: "GET",
        data: {},
        headers: {
          "Content-Type": "application/json; charset=UTF-8",
        },
        callBack: (res) => {
          res.data.rows.forEach((image) => {
            image.w_carousels.forEach((item, index) => {
              ul.innerHTML += ` <li><img src="${item.url}" alt=""></li>`;
            });
            //
          });
        },
      });
    </script>
  </body>
</html>
